@extends('frontend/layouts/default')

@section('content')

<h1>Edit Domain</h1>
{{ Form::model($domain, array('method' => 'PATCH', 'route' => array('nd.master.domain.update', $domain->id))) }}

<div class="row-fluid">
<div  class="span3 control-group {{ $errors->first('id', ' error') }}">
	<label class="control-label" for="id">Id</label>
	<input class="input-block-level" placeholder="Id" title="Id" name="id" type="text" value="{{ Input::old('id', $domain->id) }}"  readonly>
	{{ $errors->first('id', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('name', ' error') }}">
	<label class="control-label" for="name">Name</label>
	<input class="input-block-level" placeholder="Name" title="Name" name="name" type="text" value="{{ Input::old('name', $domain->name) }}">
	{{ $errors->first('name', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('name2', ' error') }}">
	<label class="control-label" for="name2">Name2</label>
	<input class="input-block-level" placeholder="Name2" title="Name2" name="name2" type="text" value="{{ Input::old('name2', $domain->name2) }}">
	{{ $errors->first('name2', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('code', ' error') }}">
	<label class="control-label" for="code">Code</label>
	<input class="input-block-level" placeholder="Code" title="Code" name="code" type="text" value="{{ Input::old('code') , $domain->code}}">
	{{ $errors->first('code', '<span class="help-block">:message</span>') }}
</div>
</div>
<div class="row-fluid">
<div  class="span3 control-group {{ $errors->first('node_parent', ' error') }}">
	<label class="control-label" for="node_parent">Node_parent</label>
	<input class="input-block-level" placeholder="Node_parent" title="Node_parent" name="node_parent" type="number" value="{{ Input::old('node_parent', $domain->node_parent) }}">
	{{ $errors->first('node_parent', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('node_left', ' error') }}">
	<label class="control-label" for="node_left">Node_left</label>
	<input class="input-block-level" placeholder="Node_left" title="Node_left" name="node_left" type="number" value="{{ Input::old('node_left', $domain->node_left) }}">
	{{ $errors->first('node_left', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('node_right', ' error') }}">
	<label class="control-label" for="node_right">Node_right</label>
	<input class="input-block-level" placeholder="Node_right" title="Node_right" name="node_right" type="number" value="{{ Input::old('node_right', $domain->node_right) }}">
	{{ $errors->first('node_right', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('node_depth', ' error') }}">
	<label class="control-label" for="node_depth">Node_depth</label>
	<input class="input-block-level" placeholder="Node_depth" title="Node_depth" name="node_depth" type="number" value="{{ Input::old('node_depth', $domain->node_depth) }}" readonly>
	{{ $errors->first('node_depth', '<span class="help-block">:message</span>') }}
</div>
</div>

<div>
{{ Form::submit('Update', array('class' => 'btn btn-info')) }} &nbsp;&nbsp;
{{ link_to_route('nd.master.domain.show', 'Cancel', $domain->id, array('class' => 'btn')) }}
</div>

{{ Form::close() }}

@stop